package com.sg.business.permission.dataset;

import com.mobnut.db.model.ModelService;
import com.mobnut.db.model.PrimaryObject;
import com.sg.business.model.DummyModel;
import com.sg.business.permission.model.IPermissionVisitor;
import com.sg.widgets.commons.dataset.MasterDetailDataSetFactory;

public abstract class VisitorDataSet extends MasterDetailDataSetFactory {

	public VisitorDataSet(String dbName, String collectionName) {
		super(dbName, collectionName);
	}

	public PrimaryObject getStaticVisitorDataObject(String name,
			String type, Object masterValue) {
		DummyModel dummyModel = ModelService.createModelObject(DummyModel.class);
		dummyModel.setValue(PrimaryObject.F_DESC, name);
		dummyModel.setValue(IPermissionVisitor.F_VISITOR_NAME, name);
		dummyModel.setValue(IPermissionVisitor.F_VISITOR_TYPE, type);
		dummyModel.setValue(IPermissionVisitor.F_VISITOR, masterValue);
		return dummyModel;
	}

}
